

#ifndef _TF_LINE_
#define _TF_LINE_

#include "tf_Node.h"
#include "tf_Geom_Object.h"
#include "tf_Geom_Object_Manager.h"

#include <vector>





class dllDeclspec TfLine : public TfGeomObject
{
public:
	TfLine();
	~TfLine();
public:
void GetNodes(IntVector& nodeIds);
int  GetPartId();

friend class TfLineManager;
protected:
	std::vector<int> m_NdVec;
};


class dllDeclspec TfLineManager : public TfGeomObjectManager
{
protected:
	TfLineManager();
public:
	~TfLineManager();
	
public:
	int  CreateLine(std::vector<int>& nodeIds, int partId);
	
	void DeleteLine(int id);
	void DeleteLines(IntVector& ids);
	
	void GetLineNodes(int id,IntVector& nodeIds);
	
	int  GetLinePartId(int id);
	void GetPartLines(int pid,IntVector& elems);
	int  GetPartLines(int pid,int* elems );
	
	void AddToDataBase(int idx, TfGeomObject* obj);
	void AdditionSpace();
	
	static TfLineManager* Instance();
	
};

#define TfLinMng (*TfLineManager::Instance())

#endif

